package com.zr.enumperson;

/**
 * Created by 天赐 on 2019/12/25.
 */
public enum LegalNameEnum {
    BEIJING("北京联想公司","0003"),SAHGNHAI("上海联想公司","0004"),TIANJIN("天津联想公司","0004");

    private String name;
    private String value;
    LegalNameEnum(String name,String value){
        this.name=name;
        this.value=value;
    }

    public String getName() {
        return name;
    }

    public String getValue() {
        return value;
    }

    /*普通方法,通过value获取name*/
   /* public static String getName(String value){

        for (LegalNameEnum le:LegalNameEnum.values()) {
            if (le.getValue()==value){
                return le.getName()
            }
            return null;
        }
    }*/
}
